package cn.tedu.spring.resource;

import cn.tedu.spring.eg2.Mapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class WeiboMapper {
    //Resource三种装配方式
    /*@Resource(name = "resMapperImpl2") //第一种 名字装配
    private ResMapper resMapper;*/

    /*@Resource
    private ResMapper resMapperImpl1;   //第二种 属性名装配*/

    @Resource
    private ResMapper resMapper;   //第三种 类型自动装配 前提只能由一种可匹配的bean对象

    @Override
    public String toString() {
        return "WeiboMapper{" +
                "resMapper=" + resMapper +
                '}';
    }
}
